package com.hotai.controller;


import com.hotai.comment.dtos.ResponseResult;
import com.hotai.service.StatisticsService;
import com.hotai.service.TongService;
import com.hotai.vo.she.SheBao;
import com.hotai.vo.she.SheBaoList;
import com.hotai.vo.tongji.CoursewareTong;
import com.hotai.vo.tongji.XuekernelPage;
import com.hotai.vo.usestudent.UserStudentdetaile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/tong")
public class TongController {

    @Autowired
    private TongService tongService;

    @Autowired
    private StatisticsService statisticsService;

    //改版  每天传数据报表
    @RequestMapping("/niu")
//    @Scheduled(cron = "0 0 23 * * ?")
    private ResponseResult study(XuekernelPage xuekernelPage) {
        return tongService.XueTongSt(xuekernelPage);
    }

    //改版 最近30日用户学习次数统计
    @RequestMapping("/niuCount")
    private ResponseResult studyCount(XuekernelPage xuekernelPage) {
        return tongService.niuTong(xuekernelPage);
    }


    //数据报表
    @RequestMapping("/xue")
    private ResponseResult xue() {
        return tongService.xuethh();
    }


    //数据报表
//    @RequestMapping("/xue")
    private ResponseResult xueji(XuekernelPage xuekernelPage) {
        return statisticsService.XueTong(xuekernelPage);
    }

    //教师每天授课数据
    @RequestMapping("/TearCount")
    private ResponseResult xuejiTear() {
        return tongService.TearTong();
    }




    //最近30日用户学习次数统计
    @RequestMapping("/StuCount")
    private ResponseResult xuejiStu() {
        return tongService.StuTong();
    }


    //数据报表
    @RequestMapping("/Tear")
    private ResponseResult Tearc() {
        return tongService.Teart();
    }

    //授课时间前5
    @RequestMapping("/Sho")
    private ResponseResult Shoshi() {
        return tongService.ShoT();
    }

    //改版授课时间前5
    @RequestMapping("/proSho")
    private ResponseResult Shoshi(XuekernelPage xuekernelPage) {
        return tongService.proSho(xuekernelPage);
    }
    //改版学习时间前5 课件
    @RequestMapping("/proCourware")
    private ResponseResult proCourware(XuekernelPage xuekernelPage) {
        return tongService.ShoCourPro(xuekernelPage);
    }
    //学习次数前5 课件
    @RequestMapping("/Courwarelou")
    private ResponseResult Courwarelou(XuekernelPage xuekernelPage) {
        return tongService.ShoCourlou(xuekernelPage);
    }

    //学习时间前5 课件
    @RequestMapping("/Courware")
    private ResponseResult Courware() {
        return tongService.ShoCour();
    }

    //各科学习指标人数
    @RequestMapping("/CourwareTong")
    private ResponseResult CourwareTong(XuekernelPage xuekernelPage) {
        return tongService.CourwareTong(xuekernelPage);
    }

    //各科学习指标时长
    @RequestMapping("/CourwareTongShi")
    private ResponseResult CourwareTongShi(XuekernelPage xuekernelPage) {
        return tongService.CourwareTongShi(xuekernelPage);
    }

    //各科 课程学习平均时长
    @RequestMapping("/CourwareTongPin")
    private ResponseResult CourwareTongPin(XuekernelPage xuekernelPage) {
        return tongService.CourwareTongPin(xuekernelPage);
    }

    //课程学习次数
    @RequestMapping("/CourwareTongCi")
    private ResponseResult CourwareTongCi(XuekernelPage xuekernelPage) {
        return tongService.CourwareTongPinCi(xuekernelPage);
    }





    //课程完成度
    @RequestMapping("/CourwareTongDu")
    private ResponseResult CourwareTongDu() {
        return tongService.CourwareTeaDu();
    }

    //课件
    @RequestMapping("/list")
    private ResponseResult Coursewaredetail(CoursewareTong queryware) {
        return tongService.CourseTong(queryware);
    }

    //设备端返回报告数据
    @RequestMapping("/addBao")
    private ResponseResult addBaoGao(@RequestBody SheBaoList sheBao) {
        return tongService.BaoGao(sheBao);
    }


}
